package WWW.SST.LIB;

/** 
 Comm_FormatChk ��ժҪ˵����
*/
public class Comm_FormatChk
{
	public Comm_FormatChk()
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
	}

	public static boolean BeishorPass(Object s)
	{
		boolean p = false;
		//is numeric
		try
		{
			 Double.parseDouble(s.toString().trim().trim());
			 p = true;
		}
		catch (java.lang.Exception e)
		{
			p = false;
		}
		if (p == false)
		{
			return false;
		}

		//Is Zhenshor?
		double d = Double.parseDouble(s.toString().trim().trim());
		long i = java.lang.Math.round(d);
		if ((double)i == d)
		{
			p = true;
		}
		else
		{
			p = false;
		}


		if (p == false)
		{
			return false;
		}

		//Is >0 and <999999
		long beishor = java.lang.Math.round(d);
		if (beishor > 0 && beishor < 999999)
		{
			p = true;
		}
		else
		{
			p = false;
		}

		if (p == false)
		{
			return false;
		}

		return true;

	}
}